﻿namespace CsharpPro._0925
{
    public class Travel
    {
        private const double Price = 8800;

        public double Judge(int month, string transportType)
        {
            double discount = 0;

            if (month >= 5 && month <= 10)
            {
                if (transportType == "航班")
                {
                    discount = 0.9;
                }
                else if (transportType == "动车")
                {
                    discount = 0.75;
                }
            }
            else
            {
                if (transportType == "航班")
                {
                    discount = 0.6;
                }
                else if (transportType == "动车" )
                {
                    discount = 0.3;
                }
            }

            return Price * discount;
        }
    }
}